﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Verse.Platform.Community
{
       /*             ------------------    ----------------    ------------------    -----------------------------------
        *            | Community Begin | => | Send Request | => @ General RSAKey @ => | Save Private Key With Client Id |
        *            -------------------    ----------------    ------------------    -----------------------------------
        *                                                               ||
        *                                                  ---------------------------     ------------------------------------------------
        *                                                  | Callback With PublicKey |     | @Decrypt Data With Private Key@ And Response |
        *                                                  ---------------------------     ------------------------------------------------                 
        *                                                               ||                                       ||
        *                                              ------------------------------------      ----------------------------------------             
        *                                              | Send @Encrypt Data With PublicKey@ | => | Get Saved Private Key With Client Id |
        *                                              ------------------------------------      ----------------------------------------
        *                   
        */
    public interface IRSA
    {
       
        String GeneralRSAKey(out String PublicKey);

        String Encrypt(String PublicKey);

        String Decrypt(String PrivateKey);
        
    }

    /// <summary>
    /// 1 ClientId 2 ConsultKey 3 Save Private Key With ClientId
    /// </summary>
    public interface IRsaService
    {
        /*public class RsaHeader
    {
        public String ClientId { get; set; }
        public String VerfyKey { get; set; }
        public String PublicKey { get; set; }
    }*/
        bool GetClientId();//Callback Data in Header Soap
        /// <summary>
        /// Client send a request to consult keys with server.Send Client Id in header soap.Callback public key in header soap.
        /// </summary>
        /// <returns>IsConsultSucceed</returns>
        bool ConsultKey();
    }

    
}
